import 'package:get/get.dart';

import '../../app/tab_bar.dart';


// 全局响应数据
class GlobalService extends GetxService {
  // 首页信息
  final RxInt tabIndex = 0.obs;

  final RxList appBarList = [].obs;

  GlobalService init() {
    appBarList.clear();
    appBarList.addAll(TabBarConfig.tabBarList);

    return this;
  }

  void setTabIndex(int value) {
    if (tabIndex.value != value) {
      tabIndex.value = value;
    }
  }

}
